<table border="0" width="540"><tr><td valign="top">
   <t1><%=h @entry.title %></t1>
   <br><subs>(<b>posted on</b> <%= @entry.created_at %>)</subs>
   <br><b>category</b> : <%=h @entry.category %>
   <% if @entry.category == "other" %>
      | <b>sub-category</b> : 
     <%=h @entry.othercategory %>   
   <% end %>
   | 
   <b>location</b>: <%=h @entry.state %>
   <% if @entry.category == "other" %><br><%else%> | <%end%>
   <b>tags</b><% for tag in @tags %>
 : <%= link_to h(tag.tag), entry_tag_url(@entry,tag) %>
<% end %>
<%if @entry.user_id == current_user.id%>
: (<%= link_to 'add tag', new_entry_tag_url(@entry) %>)
<%end%>
</td>
<td valign="top" width="101">
<div align="right" id="subs">
	<%if @entry.user.userpic.filename != nil%>
		<img width="100" src="<%= @entry.user.userpic.public_filename %>">
	<%else%>
		<img src="../images/smiley.jpg">
	<%end%>
<br><b><div align=center><%= link_to h(@entry.user.login), @entry.user %></div></b></div>
</td></tr>
</table>

<!--<p><%#= link_to 'entries from same state', (render :partial => 'entries/state') %></p>-->

<p align="center">
  <% if @entry.picture != '' %>
    <a href="<%= @entry.picture %>"><img class="resize-pic" src="<%=@entry.picture%>"></a>
  <% else %>
  <% if @entry.pic.filename != nil %>
        <a href="<%= @entry.pic.public_filename %>"><img class="resize-pic" src="<%= @entry.pic.public_filename %>"></a>
  <%else%>
        <img src="../images/holder.jpg">
  <% end %>
  <% end %>
</p>
<p>
     <%=h @entry.description %>
</p>
<p align="center">
<div id="star-ratings-block" align="center">
    <%= render :partial => "rating/rate", :locals => { :entry => @entry } %>
</div>
</p>
<p>
<div id="shadowed-border2" class="sb">
<div id="comment">
<% i=0 %>
<table border="0" width="500">
<% for comment in @comments %>
<% i+=1 %>
<tr><td>
<center>
<%if comment.anon == 'no'%>
	<%if comment.user.userpic.filename != nil%>
		<img width=100 src="<%= comment.user.userpic.public_filename %>">
	<%else%>
		<img src="../images/smiley.jpg">
	<%end%>
	<br><b><%= link_to h(comment.user.login), comment.user %></b>
<% else %>
	<img src="../images/smiley.jpg">
	<br><b>anonymous</b>
<% end %>
  </center>
  </td>
  <td>
<p align="right">
<t1><%= i %></t1>
</p>
<a name="comments"></a><p><%= comment.comment %></p>
<p align="right"><subs>
<% if current_user.id == comment.user_id %>
<%= link_to 'edit', edit_entry_comment_path(@entry,comment) %> | <%= link_to 'delete', entry_comment_path(@entry,comment), :confirm => 'Are you sure?', :method => :delete %>
<% else %>
<% if current_user.id == @entry.user_id %>
<%= link_to 'delete', entry_comment_path(@entry,comment), :confirm => 'Are you sure?', :method => :delete %>
<% end %>
<% end %>
<br><%= comment.created_at %>
</p>
</subs>
</p>
</td></tr>
<tr><td><hr></td><td><hr></td></tr>
<% end %>
</table>

<%= link_to 'post a new comment', new_entry_comment_url(@entry) %>
</div>
</p>
</div>
<p>
<% if current_user.id == @entry.user_id %>
<%= link_to 'edit entry', edit_entry_path(@entry) %> | <%= link_to 'delete', @entry, :confirm => 'Are you sure?', :method => :delete %> | 
<% end %>
<%= link_to 'back to entries', entries_path %>
</p>
</body>
</html>